package com.mycompany.myapp.service.mapper;

import com.mycompany.myapp.domain.Teacher;
import com.mycompany.myapp.service.dto.TeacherDTO;
import java.util.Set;
import org.mapstruct.*;

/**
 * Mapper for the entity {@link Teacher} and its DTO {@link TeacherDTO}.
 */
@Mapper(componentModel = "spring", uses = { UserClassMapper.class })
public interface TeacherMapper extends EntityMapper<TeacherDTO, Teacher> {
    @Mapping(target = "userClasses", source = "userClasses", qualifiedByName = "idSet")
    TeacherDTO toDto(Teacher s);

    @Named("id")
    @BeanMapping(ignoreByDefault = true)
    @Mapping(target = "id", source = "id")
    TeacherDTO toDtoId(Teacher teacher);

    @Named("idSet")
    @BeanMapping(ignoreByDefault = true)
    @Mapping(target = "id", source = "id")
    Set<TeacherDTO> toDtoIdSet(Set<Teacher> teacher);

    @Mapping(target = "removeUserClass", ignore = true)
    Teacher toEntity(TeacherDTO teacherDTO);
}
